﻿<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>摆渡社区 -- <{$user_info['uinickname']?$user_info['uinickname']:$user_info['uname']}>的主页  --</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="apple-touch-icon-precomposed" href="__PUBLIC__/images/icon/icon.png">
<link rel="shortcut icon" href="__PUBLIC__/images/icon/icon.ico">
<link rel="stylesheet" href="__PUBLIC__/pers/css/base.css">
<link rel="stylesheet" href="__PUBLIC__/pers/css/topbar.css">
<link href="__PUBLIC__/pers/css/base_1.css" rel="stylesheet">
<link href="__PUBLIC__/pers/css/sidebar.css" rel="stylesheet">
<link href="__PUBLIC__/pers/css/page.css" rel="stylesheet" />
<link href="__PUBLIC__/pers/css/secure-center.css" rel="stylesheet">
<link href="__PUBLIC__/pers/css/securecenter.css" rel="stylesheet">
<link href="__PUBLIC__/pers/css/account.css" rel="stylesheet">
<link href="__PUBLIC__/pers/css/homepage.css" rel="stylesheet">
<link href="__PUBLIC__/pers/css/banner.css" rel="stylesheet">
<link href="__PUBLIC__/pers/css/style.css" rel="stylesheet">


</head>
<body flush="1">

<div class="nav">
    <div class="hi-nav2 oh">
        <div class="hi-navInner w1000 mlra oh">
            <div class="logo oh fl">
                <a href="<{:U('Index/index')}>"><img class="mt20" src="__PUBLIC__/images/logo.png" alt="" width="134" height="80"></a>
            </div>
            <ul class="hi-navUl oh fl">
                <li class=""><a class="hi-navA1" href="<{:U('Index/index')}>">首页</a></li>
                <li class="on"><a class="hi-navA2" href="<{:U('Pers/index')}>">个人主页</a></li>
                <li class=""><a class="hi-navA4" href="<{:U('News/index')}>">消息</a></li>
                <li class=""><a class="hi-navA5" target="_blank" href="<{:U('Home/Show/index')}>">分享达人</a></li>
                <li class=""><a class="hi-navA6" target="_blank" href="<{:U('Home/Classify/index?id=56')}>">经验分类</a></li>

            </ul>
        </div>
    </div>
</div>

<div class="banner">
    <div class="hi-banner h-space-banner  hi-banner" >
        
    </div>
</div>

<div class="w1000 mlra hi-main">
<div class="leftbar">
</div>

<!--中间-->
<div class="main fl">
<div class="hi-center-left fl">
<div class="homepageProfile mb20">
    <div class="hpUserInfoBox fl mr10">
        <div class="hpUserInfoBoxBg"></div>
        <div class="hpUserInfoInner">
            <div class="hpUserInfo1" id="hi_user_info" uid="452929299">
                    <div class="mb10">

                    <if condition="($user_info['path'] eq null)">
                    <img class="br4" src="__PUBLIC__/images/nothing.jpg" alt="" width="160" height="160">
                    <else />
                     <img class="br4" src="__ROOT__<{$user_info['path']}>" alt="" width="160" height="160" onerror="onerror=null;src='__PUBLIC__/images/nothing.jpg'">
                    </if>

                    </div>
                <div class="oh user-sub-count user-sns-count" style="min-height:100px">
                    <ul>
                        <li>
                            <p><a class="num" title="我的关注数" id="faned_num"><{$att_number}></a></p>
                            <p>关注</p>
                        </li>
                        <li>
                            <p><a class="num" title="我的粉丝数">
                            <{$fans_number}></a></p>
                            <p>粉丝</p>
                        </li>
                        <li>
                            <p><a class="num"><{$user_info['level']}></a></p>
                            <p>等级</p>
                        </li>
                        <li>
                            <p><a class="num"title="我发布的经验"><{$exp_num}>
</a></p>
                            <p>总经验</p>
                        </li>

                        <li>
                            <p class="num"><{$user_info['uiexp']}></p>
                            <p>经验值</p>
                        </li>

                        <li>
                            <p class="num" id="myGold"><{$user_info['uigold']}></p>
                            <p id="less50"></p>
                            <p><{$askPage=='my'?'我的':'TA的'}>财富</p>
                        </li>
                    </ul>
                </div>
            </div>

            <div class="hpUserInfo2">
                <p>注册时间：<span class="c999"><{$user_info['utime']}></span></p>
            </div>
        </div>
    </div>
    <div class="hpUserInfoBox2 fl">
        <div class="hpUserInfo3">
            <div class="oh mb5">
                <div class="fl">
                    <div class="h40 lh40 fl mr15 hpUserName"><{$user_info['uinickname']?$user_info['uinickname']:$user_info['uname']}></div>
                    <div class="levelBox fl mr10">
                        <div>
                           <a title="当前等级">
                              <span class="middle"><span class="bold"><{$user_info['level']}></span>级</span>
                              <span class="bgLevel middle"><span class="level" style="width: <{$user_info['exp_css']}>%;"></span></span>
                           </a>
                        </div>
                        <div>当前经验:<{$user_info['exp_css']}>%</div>
                        <div><{$design}></div>
                    </div>
                    <div class="h40 lh40 fl">
                    </div>
                </div>
                <if condition="($askPage eq 'my')">
                <div class="h40 lh40 fr">
                        <a class="my-btn middle" id="go" rel="leanModal" name="loginmodal" href="#loginmodal">修改资料</a>
                </div>
                <div class="h40 lh40 fr">
                        <a class="my-btn middle" id="go" rel="leanModal" name="myPhoto" href="#myPhoto">上传头像</a>
                </div>
                <else/>
                <{$relationToMe}>
                <div class="h40 lh40 fr">

                        <if condition="($relationToMe eq 2) OR ($relationToMe eq 4)">
                        <a onclick="PayAttention(<{$_GET['uid']}>,this)" class="my-btn">+ 关注 </a>
                        <a onclick="isRemoveAttention(<{$_GET['uid']}>,this)" class="my-btn" style="display:none">取消关注</a>
                        <else/>
                        <a onclick="PayAttention(<{$_GET['uid']}>,this)" class="my-btn" style="display:none">+ 关注 </a>
                        <a onclick="isRemoveAttention(<{$_GET['uid']}>,this)" class="my-btn">取消关注</a>
                        </if>
                
                </div>
                </if>
            </div>
            <div class="lh25 mb15 clearBoth">
            <if condition="$user_info['uisex'] eq 1">
                <i class="mopIcon20-26 middle"></i><span class="mr25">男
                <else /><i class="mopIcon20-27 middle"></i><span class="mr25">女
                </if>
  </span>
                <i class="hi-hpAge middle"></i><span class="mr25"><{$user_info['uiage']}>岁</span>
                
            </div>
        </div>
        <div class="hpUserInfo4">
            <div class="leftSharp fl oh"></div>
            <div class="rightCtn br8 fl">
                <div class="bold fl">个性签名：</div>
                <div class="oh c999"><{$user_info['uisignature']}></div>
                <div class="clearBoth"></div>
            </div>
        </div>
    </div>
    <div class="clear"></div>
</div>
<div class="w740 hi-titleTab oh">
    <ul class="titTUl J-hpTabUl" id="hi-spaceFeedTab">
        
        <li class="mr5 "><a style="cursor:pointer;" class="on"><{$askPage=='my'?'我的经验':'TA的经验'}></a></li>
        <li class="mr5"><a style="cursor:pointer;"><{$askPage=='my'?'我的收藏':'TA的收藏'}></a></li>
        
        <li class="mr5"><a style="cursor:pointer;"><{$askPage=='my'?'我的资料':'TA的资料'}></a></li>
        <li class="mr5"><a style="cursor:pointer;">社区制度</a></li>
    </ul>
</div>
<div class="w740 hi-spaceContent" style="min-height: 500px;">
<input id="h-ajaxSpaceTab" type="hidden" value="reply" sUid="452929299" page="">
<ul id="user_info_main">

    <li class="pt20 pb15 txtcenter" style="display:block;" id="articles">
        <if condition="($articles eq null)">
        <span><h2>还没有发布过任何经验</h2></span>
        <else/>
            <volist name="articles" id="article">
                    <span><a href="<{:U('Content/index')}>?id=<{$article.id}>" title="<{$article.title}>"><{$article.new_title}></a><i>[<{$article.create_time}>]
                    <if condition="($askPage eq 'my')">
                    <button onclick="delArticle(<{$article.id}>,this)" class="btn-danger">删除</button>
                    <button onclick="toHot(<{$article.id}>,this)" class="btn-warning">置顶</button>
                    </if>
                    </i></span>
            </volist>
            <div class="green-black " class=""><{$page}></div>
        </if>


        
    </li>
    <li class="pt20 pb15 txtcenter" style="display:none;">
        <h2><{$askPage=='my'?'我':'TA'}>的收藏:</h2>
        <hr>
        <br/>
        <if condition="($zans eq null)">
        <h3>还没有收藏任何经验~~~</h3>
        <else/>
        <volist name="zans" id="my_zan">
        <span class="zanofmine">
            <a href="<{:U('Content/index')}>?id=<{$my_zan.id}>" >
                <img src="__ROOT__<{$my_zan.pic}>" title="<{$my_zan.title}>" onerror="onerror=null;src='/Public/Uploads/error.jpg'">
                <strong><{$my_zan.short_title}></strong>
            </a>
        </span>
        </volist>
        
        </if>
    </li>
    
    <li class="pt20 pb15 " style="display:none;">
        <h2>个人资料 :</h2>
        <br/>
        <hr>
        <br/>
        <p>昵称:<{$user_info['uinickname']}></p><br>
        <p>年龄:<{$user_info['uiage']}>岁</p><br>
        <p>性别:<if condition="$user_info['uisex'] eq 1">男
          <else />女
        </if></p><br>
        <p>电话:<{$user_info['uphone']}></p><br>
        <p>邮箱:<{$user_info['uemail']}></p><br>
        <p>金币:<{$user_info['uigold']}>个</p><br>
        <p>个性签名:<{$user_info['uisignature']}></p><br>
        <p>注册时间:<{$user_info['utime']}></p><br>

    </li>
<li class="pt20 pb15 txtcenter my-rule" style="display:none;">
<h2>社区制度:</h2>
<br/><hr/><br/>
<p>1.新用户注册成功奖励50经验,50金币</p>
<br/>
<p>2.用户发表的经验每被收藏一次奖励20金币</p>
<br/>
<p>3.用户发布一篇经验奖励20经验,5个金币</p>
<br/>
<p>4.每置顶一次自己发布的经验花费50个金币</p>
<br/>
<p>5.用户发布色情,暴力,违法的文章将会被管理员封号,删除其所有数据</p>
<br/>
<p>--最终解释权归摆渡社区所有--</p>

</li>
</ul>

      <!-- 个人资料摸态框 -->
      <div id="loginmodal" style="display:none;">
          <center><h1>个人资料</h1></center>
          <form id="loginform" name="loginform" method="post" action="<{:U('Pers/edit')}>">
            <label for="username">昵称:</label>
            <input type="text" name="username" id="username" class="txtfield" tabindex="1" value="<{$user_info['uinickname']}>">
             
            <label for="age">年龄:</label>
            <input type="text" name="age" id="age" class="txtfield" tabindex="2" value="<{$user_info['uiage']}>">

            <b>性别:</b>
            <input type="radio" name="sex" tabindex="4" value="1" 
                <if condition="$user_info['uisex'] eq 1">checked
                </if>
            >男
            <input type="radio" name="sex" tabindex="5" value="2"
                <if condition="$user_info['uisex'] eq 2">checked
                </if>
            >女<br><br>
             
             <label for="phone">电话:</label>
            <input type="text" name="phone" id="phone" class="txtfield" tabindex="6" value="<{$user_info['uphone']}>">

            <label for="email">邮箱:</label>
            <input type="text" name="email" id="email" class="txtfield" tabindex="7" value="<{$user_info['uemail']}>">

            <label for="per">个性签名:</label>
            <input type="textarea" name="per" id="per" class="txtfield" tabindex="8" value="<{$user_info['uisignature']}>">

            <div class="center"><input type="submit" name="loginbtn" id="loginbtn" class="flatbtn-blu hidemodal" value="提交" tabindex="3"></div>
          </form>
      </div>

      <!-- 上传头像模态框 -->
      <div id="myPhoto" style="display:none;">
          <center><h1>上传头像</h1></center>
          <form id="loginform" name="loginform" method="post" action="<{:U('Pers/photo')}>" enctype="multipart/form-data">
            <label for="username">选择一张图片:</label>
            <div class="center">
            <input type="file" name="newPhoto" id="username" class="txtfield" tabindex="1" value="<{$user_info['uinickname']}>">
             </div>
            
            <div class="center"><input type="submit" name="loginbtn" id="loginbtn" class="flatbtn-blu hidemodal" value="提交" tabindex="3"></div>
          </form>
      </div>

<script type="text/javascript">
    // 资料选项卡
    var lis = document.getElementById('user_info_main').getElementsByTagName('li');
    var btns = document.getElementById('hi-spaceFeedTab').getElementsByTagName('a');
    // console.log(btns);
    for (var i = 0; i < btns.length; i++) {
        // 闭包
        (function(i){
            btns[i].onclick = function(){
                for (var o = 0; o < btns.length; o++) {
                    lis[o].style.display = 'none';
                    btns[o].className = '';
                };
                lis[i].style.display = 'block';
                btns[i].className = 'on';

            }
        })(i)
    };


</script>
</div>
</div>
</div>
<!--中间-->

<!--右侧-->
<div class="rightbar">
<div class="hi-rightbar-wrapper">
    <div class="hi-right-bg"></div>


    <div class="hi-rightbar">
        <div class="mt30 oh right-item">
            <form action="<{:U('Pers/index')}>" method="post">
                    <h3 id="search-user">搜索用户</h3>
                    <br/>
                    <input type="text" name="uname" id="AskUsername" autocomplete="off" placeholder="请输入您想搜索的用户名然后点击访问..." size="38">
                    <ul id="result">

                    </ul>
                    
            </form>
        </div>
        <div class="mt30 oh right-item">
            <div class="title-more">
                <div class="right-btns">
                    <a class="active-btn" id="fan-btn">粉丝列表</a>
                    <a class="default-btn" id="att-btn">关注列表</a>
                </div>
                
                <ul id="fans" class="flowers">
                <div class="yahei fl fs14 title"><span class="c333 bold">
                <if condition="($askPage eq 'my')">
                My Fans
                <else />
                His/Her Fans
                </if>
                </span></div>
                <if condition="(count($fans) gt 3)">
                <a class="hi-btnMore middle more fr oh btn show-btn" onclick="showfans()">查看更多</a>
                </if>
                <br/>
                    <volist name="fans" id="fan">
                        <li class="other_info">
                            <div class="other_info_left">
                                <a href="<{:U('Pers/index')}>?uid=<{$fan.id}>">
                                    <if condition="($fan.path eq null)">
                                    <img src="__PUBLIC__/images/nothing.jpg" >
                                    <else />
                                    <img src="<{$fan.path}>"onerror="onerror=null;src='__PUBLIC__/images/nothing.jpg'" >
                                    </if>
                                    
                                </a>
                            </div>
                            <div class="other_info_right">
                                <a href="<{:U('Pers/index')}>?uid=<{$fan.id}>">
                                    <h3>
                                        <if condition="($fan.nickname eq null)">
                                        <{$fan['name']}>
                                        <else />
                                        <{$fan['nickname']}>
                                        </if>
                                    </h3>
                                </a>
                                <p>Lv.<{$fan['level']}><{$fan['reward']}></p>
                            <if condition="($fan.id neq $_SESSION['user']['uid'])">
                                <if condition="($fan.relation_num eq 2) OR ($fan.relation_num eq 4) ">
                                <a onclick="PayAttention(<{$fan.id}>,this)" class="payattention" style="
    display: inline;
"> + 个关注</a>
                                <a onclick="isRemoveAttention(<{$fan.id}>,this)" class="payattention" style="
    display: none;
">  取消关注</a>
                                <else />
                                <a onclick="PayAttention(<{$fan.id}>,this)" class="payattention" style="
    display: none;
"> + 个关注</a>
                                <a onclick="isRemoveAttention(<{$fan.id}>,this)" class="payattention" style="
    display: inline;
">  取消关注</a>
                                </if>
                            <else/>
                            It`s Me!!
                            </if>
                            </div>
                            <div class="send" style="display:none">
                                <div class="arrow"></div>
                                <h4>个性签名 :</h4>
                                <span>
                                    <if condition="($fan.signature eq null)">
                                    主人很懒很懒........,什么都没有留下~(ㄒoㄒ)~~
                                    <else/ >
                                    <{$fan.signature}>
                                    </if>
                                </span>
                            </div>
                        </li>

                    </volist>
                </ul>
            </div>

        </div>
        <div class="mt30 oh right-item">
            <div class="title-more">
                
                <ul id="attentions" class="flowers" style="display:none">
                <div class="yahei fl fs14 title"><span class="c333 bold">
                <if condition="($askPage eq 'my')">
                我的关注
                <else />
                他/她的关注
                </if>
                <span class="c999 homeFollowCount"></span></span></div>
                <if condition="(count($attentions) gt 3)">
                <a class="hi-btnMore middle more fr oh btn show-btn" onclick="showatts()">查看更多</a>
                </if>
                <br/>
                    <volist name="attentions" id="att">
                        <if condition="($att.id neq $_SESSION['user']['uid'])">
                            <li  class="other_info">

                            <div class="other_info_left">
                                
                                <a href="<{:U('Pers/index')}>?uid=<{$att.id}>">
                                    <if condition="($att.path eq null)">
                                    <img src="__PUBLIC__/images/nothing.jpg"> 
                                    <else />
                                    <img src="<{$att.path}>"onerror="onerror=null;src='__PUBLIC__/images/nothing.jpg'" title="123">
                                    </if>
                                </a>
                            </div>
                            <div class="other_info_right">
                                <a href="<{:U('Pers/index')}>?uid=<{$att.id}>">
                                    <h3>
                                        <if condition="($att.nickname eq null)">
                                        <{$att['name']}>
                                        <else />
                                        <{$att['nickname']}>
                                        </if>
                                    </h3>
                                </a>
                                <p>Lv.<{$att['level']}><{$fan['reward']}></p>
                                <if condition="($att.relation_num eq 2) OR ($att.relation_num eq 4)">
                                <a onclick="PayAttention(<{$att.id}>,this)" class="payattention"  style="
    display: inline;
"> + 个关注</a>
                                <a onclick="RemoveAttention(<{$att.id}>,this)" class="payattention"  style="
    display: none;
">  取消关注</a>
                                <else />
                                <a onclick="PayAttention(<{$att.id}>,this)" class="payattention"  style="
    display: none;
"> + 个关注</a>
                                <a onclick="RemoveAttention(<{$att.id}>,this)" class="payattention"  style="
    display: inline;
">  取消关注</a>
                                </if>
                            </div>
                            <div class="send" style="display:none">
                                <div class="arrow"></div>
                                <h4>个性签名 :</h4>
                                <span>
                                    <if condition="($att.signature eq null)">
                                    主人很懒很懒........,什么都没有留下~(ㄒoㄒ)~~
                                    <else/ >
                                    <{$att.signature}>
                                    </if>
                                </span>
                            </div>
                    </li>
                        <else />

                        </if>
                    </volist>

                </ul>
            </div>

        </div>


    </div>
</div>
</div>
<!--右侧-->

</div>
<div class="clear"></div>
<!--页脚-->
<div class="foot">
<div class="hi-footer oh">
    <div class="mlra oh pt30 pb30 c333">
        <p class="mb10">
            <a href="http://help.mop.com/about.jsp" target="_blank">关于摆渡</a><span class="c999 ml10 mr10">|</span><a  target="_blank" href="http://weibo.com/moptt">官方微博</a><span class="c999 ml10 mr10">|</span><a  target="_blank" href="http://help.mop.com/contact.jsp">联系我们</a><span class="c999 ml10 mr10">|</span><a  target="_blank" href="http://democity.mop.com/city">地方合作</a><span class="c999 ml10 mr10">|</span><a  target="_blank" href="http://help.mop.com/job.jsp">诚聘英才</a><span class="c999 ml10 mr10">|</span><a  target="_blank" href="http://help.mop.com/sales.jsp">营销中心</a><span class="c999 ml10 mr10">|</span><a  target="_blank" href="http://help.mop.com/contract.jsp">服务条款</a><span class="c999 ml10 mr10">|</span><a  target="_blank" href="http://help.mop.com/feedback.jsp">意见反馈</a><span class="c999 ml10 mr10">|</span><a  target="_blank" href="http://help.mop.com/help.jsp">客服中心</a>
        </p>
        <p>CopyRight&copy;2002-2014 Inc.All Right Reserved 摆渡社区 版权所有</p>

        <!-->
        <div style="display:none">
       <script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1256752136'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s95.cnzz.com/stat.php%3Fid%3D1256752136' type='text/javascript'%3E%3C/script%3E"));</script>
    </div>
    <-->

    </div>
    

    
</div>
</div>
<script src="__PUBLIC__/pers/js/jquery-1.8.3.min.js"></script>
<!-- <script src="__PUBLIC__/pers/js/base.js"></script> -->
<!-- <script src="__PUBLIC__/pers/js/topbar.js"></script> -->
<!-- <script src="__PUBLIC__/pers/js/base_1.js"></script> -->
<!-- <script src="__PUBLIC__/pers/js/hi.core.js"></script> -->
<!-- <script src="__PUBLIC__/pers/js/chooseskin.js"></script> -->
<!-- <script src="__PUBLIC__/pers/js/space.js"></script> -->
<!-- <script src="__PUBLIC__/pers/js/myfollow.js"></script> -->
<script src="__PUBLIC__/pers/js/jquery.leanModal.min.js"></script>
<script type="text/javascript">
    // 个性签名
    var imgs = $('.other_info_left');
    imgs.on('mouseenter',function(){
      // console.log($(this));
     
      $(this).next().next().fadeIn();
    })
    imgs.on('mouseleave',function(){
      // console.log($(this));
      $(this).next().next().fadeOut();
    })


    // btns.on('click',function(){
    //     $(this).removeClass('default-btn
    //         ').addClass('active-btn');
    // })
</script>

<!-- 关注ajax -->
<if condition="$askPage eq 'my'">
<script type="text/javascript">
    // 关注 ,取关 Ajax
    function PayAttention(uid,obj){
        $.ajax({
          type:'get',
          url:"<{:U('Pers/addAttention')}>",
          data:{'uid':uid},
          dataType:'json',
          success:function(data){
              $('#faned_num').html(data);
              $(obj).hide();
              $(obj).next().show();
          }
        })
    }
    //取消关注后  不  消失
    function isRemoveAttention(uid,obj){
        $.ajax({
          type:'get',
          url:"<{:U('Pers/removeAttention')}>",
          data:{'uid':uid},
          dataType:'json',
          success:function(data){
            // console.log(data);
            $('#faned_num').html(data);
            $(obj).hide();
            $(obj).prev().show();
          }
        })
    }
    //取消关注后消失
    function RemoveAttention(uid,obj){
        $.ajax({
          type:'get',
          url:"<{:U('Pers/removeAttention')}>",
          data:{'uid':uid},
          dataType:'json',
          success:function(data){
            $('#faned_num').html(data);
            $(obj).parent().parent().fadeOut();
          }
        })
    }
    
</script>
<else/>
<script type="text/javascript">
    // 关注 ,取关 Ajax
    function PayAttention(uid,obj){
        $.ajax({
          type:'get',
          url:"<{:U('Pers/addAttention')}>",
          data:{'uid':uid},
          dataType:'json',
          success:function(data){
              // $('#faned_num').html(data);
              $(obj).hide();
              $(obj).next().show();
          }
        })
    }
    //取消关注后  不  消失
    function isRemoveAttention(uid,obj){
        $.ajax({
          type:'get',
          url:"<{:U('Pers/removeAttention')}>",
          data:{'uid':uid},
          dataType:'json',
          success:function(data){
            // console.log(data);
            // $('#faned_num').html(data);
            $(obj).hide();
            $(obj).prev().show();
          }
        })
    }
    //取消关注后消失
    function RemoveAttention(uid,obj){
        $.ajax({
          type:'get',
          url:"<{:U('Pers/removeAttention')}>",
          data:{'uid':uid},
          dataType:'json',
          success:function(data){
            // $('#faned_num').html(data);
            $(obj).parent().parent().fadeOut();
          }
        })
    }
    
</script>
</if>


<script type="text/javascript">
    // 搜索用户
    $('#AskUsername').bind('input propertychange',function(){
        var where = $('#AskUsername').attr('value');
        $.ajax({
            type:'post',
            url:"<{:U('Pers/search')}>",
            data:{'uname':where},
            dataType:'json',
            success:function(data){
                $('#result a').remove();
                for (var i = 0; i < data.length; i++) {
                    $('#result').append('<a href='+"<{:U('Pers/index')}>?uid="+data[i]['id']+'>'+data[i]['name']+'</a>');
                };
                
            }
        })
    })
    // 点击将搜索到的用户名赋值给input框
    function giveValue(){
        $('#AskUsername').value('咖喱给给');
    }
    // 金币增加阅读量
    function toHot(id,obj){
        $.ajax({
            type:'get',
            url:"<{:U('Pers/toHot')}>",
            data:{'id':id},
            dataType:'json',
            success:function(data){
                alert(data.msg);
                $('#myGold').html(data.gold);
                $('#less50').text(data.less);
                $('#less50').fadeIn(1500).fadeOut(1500);
            }
        })
    }
    // 删除个人发布经验
    function delArticle(id,obj){
        $.ajax({
            type:'get',
            url:"<{:U('Pers/delete')}>",
            data:{'id':id},
            dataType:'json',
            success:function(data){
                $(obj).parent().parent().fadeOut(3000);
                alert(data);
            },
            error:function(){
                alert('删除失败')
            }
        })
    }
    
    // 右侧粉丝和关注
    $('#fans li:gt(2)').hide();
        $('#attentions li:gt(2)').hide();
    function showfans(){
      $('#fans li').fadeIn(1500);
    }
    function showatts(){
      $('#attentions li').fadeIn(1500);
    }
</script>
<div style="display: none;">

<script type="text/javascript">
$('#fan-btn').on('click',function(){
    $(this).removeClass().addClass('active-btn');
    $(this).next().removeClass().addClass('default-btn');
    $('#attentions').hide();
    $('#fans').fadeIn(1500);
})
$('#att-btn').on('click',function(){
    $(this).removeClass().addClass('active-btn');
    $(this).prev().removeClass().addClass('default-btn');
    $('#fans').hide();
    $('#attentions').fadeIn(1500);
})
// ajax 无刷新分页!



$("#page > a").click(function(){ //点击当前页a 执行一个事件
    $.ajax({
        type:"post",
        url:$(this).attr('href'),         
        success:function(data){
        $("#page").html(data);
        } 
    });
    return false;
})
</script>
<script type="text/javascript">
    var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
    document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F0e63c4134b3602bbf797711a4aaad17c' type='text/javascript'%3E%3C/script%3E"));
    $('a[rel*=leanModal]').leanModal({ top : 40, closeButton: ".hidemodal" });
</script>

</div>
</body>
</html>
